import React from 'react';
import classes from './index.module.css';

export default function Dialog({
  children,
  title,
}: {
  children: React.ReactElement;
  title?: string;
}) {
  return (
    <div className={classes.Dialog}>
      <div className={classes.DialogBg}></div>
      <div className={classes.DialogContent}>
        {!!title && <header className={classes.DialogHeader}>{title}</header>}
        {children}
      </div>
    </div>
  );
}
